﻿@model File_Manager.Models.ReporteGeneral

@{
    ViewBag.Title = "Reporte General";
}

<table class="noBorder" width="100%">
    @* Muestra el Link si hay un problemario activo *@
    @if ( ViewBag.proble_act != null && ViewBag.proble_act_user == null)
    {
    <tr>
        <td>
            <p>
               <a href="/Problemario/Respuesta"><img src="../../Content/images/Quiz_respond.png" width="55px" height="50px"/></a><b>@Html.ActionLink("Responder Problemario Activo", "Respuesta")</b>
            </p>
        </td>
    </tr> 
    }

    <tr>
        <td width="60%" style="vertical-align:bottom;">
            <h2>Reporte General</h2>
        </td>
        <td align="center" width="20%" style="vertical-align:middle;">
            <h4>Indice Global</h4>
            @ViewBag.fecha_exp
        </td>
        <td align="center" width="20%">
        @if (@ViewBag.nota_final_str > 10)
        {
            <table width="127" height="184" class="no_border" background="../../Content/images/Cyt-1000_NOTA.jpg">
                <tr>
                    <td style="vertical-align:top; text-align:center;"><br /><br />
                        <font color="#00FF00" size="4px"><b>@ViewBag.nota_final_str</b></font>
                    </td>
                </tr>
            </table>
        }
        else
        {
            <table width="127" height="184" class="no_border" background="../../Content/images/Cyt-1000_NOTA.jpg">
                <tr>
                    <td style="vertical-align:top; text-align:center;"><br /><br />
                        <font color="#CD0D13" size="4px"><b>@ViewBag.nota_final_str</b></font>
                    </td>
                </tr>
            </table>
        }
            
        </td>
    </tr>
</table>
<br />
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<fieldset>
    <legend>Datos Estudiante</legend>
        <br />
        <table width="100%">
            <tr>
                <td width="33%">
                    <div class="display-label"><b>Nombres</b></div>
                    <div class="display-field">
                        @Html.Display("name")
                    </div>
                </td>
                 <td width="33%">
                    <div class="display-label"><b>Apellidos</b></div>
                    <div class="display-field">
                        @Html.Display("last_name")
                    </div>
                </td>
                <td width="33%">
                    <div class="display-label"><b>Grupo</b></div>
                    <div class="display-field">
                        @ViewBag.idRol
                    </div>
                </td>
            </tr>
        </table>
</fieldset><br />


<!-- ETAPA 1 --> 
<fieldset>
    <legend>Primera Etapa</legend><br />

<table width="100%">
    <tr>
        <th>
            Jornada
        </th>
        <th>
            Materia 1
        </th>
        <th>
            Nota 1
        </th>
        <th>
            Materia 2
        </th>
        <th>
            Nota 2
        </th>
        <th>
            Materia 3
        </th>
        <th>
            Nota 3
        </th>
        <!--<th>
            Promedio
        </th>-->
    </tr>

 @foreach (var proble in Model.Problemario_User_I_Etapa_1)
 {
    <tr>
        <td width="10%">
            @Html.DisplayFor(modelItem => proble.nProblemario.idJornada)
        </td>
        <td width="20%">
            @Html.DisplayFor(modelItem => proble.nProblemario.nMateria_1.name)
        </td>
        <td width="10%">
        @if (proble.nota_1!=999)
        {
            @Html.DisplayFor(modelItem => proble.nota_1)
        }
        else
        {
            <text> - </text>
        }  
        </td>
        <td width="20%">
            @Html.DisplayFor(modelItem => proble.nProblemario.nMateria_2.name)
        </td>
        <td width="10%">
        @if (proble.nota_1!=999)
        {
            @Html.DisplayFor(modelItem => proble.nota_2)
        }
        else
        {
            <text> - </text>
        } 
        </td>
        <td width="20%">
            @Html.DisplayFor(modelItem => proble.nProblemario.nMateria_3.name)
        </td>
        <td width="10%">
        @if (proble.nota_1!=999)
        {
            @Html.DisplayFor(modelItem => proble.nota_3)
        }
        else
        {
            <text> - </text>
        } 
        </td>
        <!--<td width="10%">
            @Html.DisplayFor(modelItem => proble.nota_p)
        </td>-->
    </tr>
 }

</table><br />

@*@if (@ViewBag.no_etapa_1!="")
{
    <p><b>Jornadas sin Responder (Nota Obtenida = 0 ): </b> @ViewBag.no_etapa_1.</p>
}
*@

</fieldset><br />


<!-- ETAPA 2 --> 
<fieldset>
    <legend>Segunda Etapa</legend><br />

<table width="100%">
    <tr>
        <th>
            Jornada
        </th>
        <th>
            Materia 1
        </th>
        <th>
            Nota 1
        </th>
        <th>
            Materia 2
        </th>
        <th>
            Nota 2
        </th>
        <th>
            Materia 3
        </th>
        <th>
            Nota 3
        </th>
        <!--<th>
            Promedio
        </th>-->
    </tr>

@foreach (var proble in Model.Problemario_User_I_Etapa_2)
{
    <tr>
        <td width="10%">
            @Html.DisplayFor(modelItem => proble.nProblemario.idJornada)
        </td>
        <td width="20%">
            @Html.DisplayFor(modelItem => proble.nProblemario.nMateria_1.name)
        </td>
        <td width="10%">
        @if (proble.nota_1!=999)
        {
            @Html.DisplayFor(modelItem => proble.nota_1)
        }
        else
        {
            <text> - </text>
        } 
        </td>
        <td width="20%">
            @Html.DisplayFor(modelItem => proble.nProblemario.nMateria_2.name)
        </td>
        <td width="10%">
        @if (proble.nota_1!=999)
        {
            @Html.DisplayFor(modelItem => proble.nota_2)
        }
        else
        {
            <text> - </text>
        } 
        </td>
        <td width="20%">
            @Html.DisplayFor(modelItem => proble.nProblemario.nMateria_3.name)
        </td>
        <td width="10%">
        @if (proble.nota_1!=999)
        {
            @Html.DisplayFor(modelItem => proble.nota_3)
        }
        else
        {
            <text> - </text>
        } 
        </td>
        <!--<td width="10%">
            @Html.DisplayFor(modelItem => proble.nota_p)
        </td>-->
    </tr>
}

</table><br />

@*@if (@ViewBag.no_etapa_2!="")
{
    <p><b>Jornadas sin Responder (Nota Obtenida = 0 ): </b> @ViewBag.no_etapa_2.</p>
}*@


</fieldset><br />

<p>
    @Html.ActionLink("Ir Atras", "Index","Home")
</p>
